import requests

url = 'http://www.pxu.edu.cn/'
#伪造ua
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'
}
response = requests.get(url=url,headers=headers)
response.encoding = "utf-8"
page_text = response.text
# print(page_text)
with open("D:\\萍乡学院.html","w",encoding="utf-8") as fp:
    fp.write(page_text)
fp.close()
